.class public Lcom/bitauto/autoeasy/widget/GalleryAdapter;
.super Landroid/widget/BaseAdapter;
.source "GalleryAdapter.java"


# instance fields
.field private context:Landroid/content/Context;

.field private focuslist:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/News;",
            ">;"
        }
    .end annotation
.end field

.field private pageControl:Lcom/bitauto/autoeasy/widget/PageControlView;

.field private titleTextView:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;)V
    .locals 0
    .parameter "c"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/News;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 23
    .local p2, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/news/Object/News;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 24
    iput-object p2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    .line 25
    iput-object p1, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->context:Landroid/content/Context;

    .line 26
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;Lcom/bitauto/autoeasy/widget/PageControlView;Landroid/widget/TextView;)V
    .locals 0
    .parameter "c"
    .parameter
    .parameter "pageControl"
    .parameter "titleTextView"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/News;",
            ">;",
            "Lcom/bitauto/autoeasy/widget/PageControlView;",
            "Landroid/widget/TextView;",
            ")V"
        }
    .end annotation

    .prologue
    .line 28
    .local p2, focuslist2:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/news/Object/News;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 30
    iput-object p2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    .line 31
    iput-object p1, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->context:Landroid/content/Context;

    .line 32
    iput-object p3, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->pageControl:Lcom/bitauto/autoeasy/widget/PageControlView;

    .line 33
    iput-object p4, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->titleTextView:Landroid/widget/TextView;

    .line 34
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 38
    iget-object v0, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 43
    iget-object v0, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 49
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 4
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 54
    iget-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->context:Landroid/content/Context;

    invoke-static {v2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    .line 55
    .local v1, inflater:Landroid/view/LayoutInflater;
    const v2, 0x7f03000a

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 57
    const v2, 0x7f0b0017

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/widget/RemoteImageView;

    .line 58
    .local v0, imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;
    const v2, 0x7f0b0018

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->titleTextView:Landroid/widget/TextView;

    .line 59
    const v2, 0x7f0b0019

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/bitauto/autoeasy/widget/PageControlView;

    iput-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->pageControl:Lcom/bitauto/autoeasy/widget/PageControlView;

    .line 61
    iget-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->pageControl:Lcom/bitauto/autoeasy/widget/PageControlView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    invoke-virtual {v2, v3}, Lcom/bitauto/autoeasy/widget/PageControlView;->setCount(I)V

    .line 65
    sget-object v2, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v2}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 68
    const v2, 0x7f020008

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setDefaultImage(Ljava/lang/Integer;)V

    .line 69
    iget-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/bitauto/autoeasy/news/Object/News;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/news/Object/News;->getFirstPicUrl()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setImageUrl(Ljava/lang/String;)V

    .line 70
    iget-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->pageControl:Lcom/bitauto/autoeasy/widget/PageControlView;

    invoke-virtual {v2, p1}, Lcom/bitauto/autoeasy/widget/PageControlView;->generatePageControl(I)V

    .line 71
    iget-object v2, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->titleTextView:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/widget/GalleryAdapter;->focuslist:Ljava/util/ArrayList;

    invoke-virtual {v3, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/bitauto/autoeasy/news/Object/News;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/news/Object/News;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 73
    return-object p2
.end method
